package com.darren.framework.service.impl;
import java.sql.SQLException;
import java.util.Map;

import javax.annotation.Resource;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.stereotype.Service;

import com.darren.framework.dao.BaseDao;
import com.darren.framework.service.BaseService;

//import net.sf.ehcache.CacheManager;

/**
 * <pre>
 * *********************************************
 * Copyright DARREN
 * All rights reserved.
 * Description: TODO(description)
 * HISTORY:
 * *********************************************
 *  Version		Date		Author	   		Desc	
 *   v1.0       2018-05-21  Darren Zhou    Create

 * *********************************************
 * </pre>
 */

@Service(value="baseService")
public class BaseServiceImpl implements BaseService {
	
	protected Logger logger = LogManager.getLogger(getClass());
	
	@Resource
	protected BaseDao baseDao;
	
//	@Autowired
//    protected CacheManager cacheManager;

	@Autowired
	protected RedisCacheManager cacheManager;
	
	@Override
	public Map<String, Object> getDataMap(String sql,Object... objs) throws SQLException{
		return baseDao.getDataMap(sql, objs);
	}
	
}
